<!DOCTYPE html>
<!--
An example web page that creates and displays a custom Google Maps API Map Type
for Earth Engine map tiles.  See Google Maps documentation on Custom Map Types
for details.
-->
<html>
  <head>
    <title>SRTM</title>
  </head>
  <body>
    <!-- The element into which we render the Google Map. -->
    <div id="map" style="width: 640px; height: 480px;"></div>

    <!-- Load compiled Earth Engine JavaScript client library. -->
    <script src="/static/ee_api_js.js"></script>

    <!-- Load our JavaScript file. -->
    <script src="/static/script.js"></script>

    <!-- Create a callback to boot our application. -->
    <script>
      // This function will run after the Google Maps API has finished leading,
      // as specified by the &callback=initMap parameter in the Maps API script
      // URL (below).
      var initMap = function() {
        // The values of mapid and token for the map tiles, generated by Earth
        // Engine using the Python script server.py, are injected here using
        // the Jinja2 templating engine.
        initialize('{{ mapid }}', '{{ token }}');
      };
    </script>

    <!-- Load the Google Maps API, and run the initMap() callback when finished. -->
    <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
            async defer></script>
  </body>
</html>
